﻿using System;
using System.Collections.Generic;

namespace Eneta.Portal.Common.Dto
{
    /// <summary>
    /// Class for third level IO items. This class is marked as serializable to support 
    /// different caching mechanisms.
    /// </summary>
    [Serializable]
    public class IoLevel3
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="IoLevel3"/> class.
        /// </summary>
        public IoLevel3()
        {
            Products = new List<IoProduct>();
        }

        /// <summary>
        /// Gets or sets the id of third level item.
        /// </summary>
        public int Id { get; internal set; }

        /// <summary>
        /// Gets or sets the title of third level item.
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the second level item that owns this third level item.
        /// </summary>
        public IoLevel2 Level2 { get; set; }

        /// <summary>
        /// Gets or sets the products that belong under this third level item.
        /// </summary>
        public IList<IoProduct> Products { get; internal set; }
    }
}
